#!/bin/bash

set -e

if [ -n "$DATADIR" ]; then
	NGINX_LOG=$DATADIR/log/nginx
	WWWDIR=$DATADIR/www/html
else
	NGINX_LOG=/var/log/nginx
	WWWDIR=/var/www/html
fi
if [ ! -d $WWWDIR ]; then
	mkdir $WWWDIR
fi

docker run -d -p 80:80 --name wordpress -v $WWWDIR:/var/www/html wordpress 
